/**
* 版权声明：厦门睿商网络科技有限公司 版权所有 违者必究
* 日    期：2021-01-05
*/
package com.rzico.article.entity;

import com.rzico.annotation.IgnoreSwaggerParameter;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import java.util.Date;
import java.util.List;
import javax.persistence.*;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

/**
 * <pre>
 *   笔记评论数据库对象
 * </pre>
 * @author Rzico Boot
 * @version 1.0
 */
@Data
@JsonIgnoreProperties(value = {"handler"})
@JsonInclude(JsonInclude.Include.NON_NULL)
@Table(name = "wx_article_review")
public class ArticleReview implements Comparable<ArticleReview>{
    @Id
    @ApiModelProperty(value = "" )
    protected Long id;

    @ApiModelProperty(value = "创建日期" )
    protected java.util.Date createDate;

    @ApiModelProperty(value = "修改日期" )
    protected java.util.Date modifyDate;

    @ApiModelProperty(value = "" )
    protected Long articleId;

    @ApiModelProperty(value = "头像" )
    protected String avatar;

    @ApiModelProperty(value = "用户昵称" )
    protected String nickname;

    @ApiModelProperty(value = "会员" )
    protected Long memberId;

    @ApiModelProperty(value = "评论内容" )
    protected String content;

    @ApiModelProperty(value = "回复id")
    protected Long forReviewId;

    @ApiModelProperty(value = "父类")
    protected Long parentId;

    @Transient
    protected String reviewName;

    protected List<ArticleReview> child;

    @Override
    public int compareTo(ArticleReview o) {
        return - getCreateDate().compareTo(o.getCreateDate());
    }
}
